<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  Created by IntelliJ IDEA.
  User: 联想
  Date: 2020/3/24
  Time: 20:27
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
<h1>管理员管理老师</h1>

<table>
    <thead>
    <tr>
        <th>老师工号</th>
        <th>老师姓名</th>
        <th>老师性别</th>
        <th>老师生日</th>
        <th>所属院系</th>
        <th>联系电话</th>
        <th>联系地址</th>
        <th>邮件</th>
        <th>账号状态</th>
        <th>账号添加时间</th>
        <th>账号激活时间</th>
        <th>注册人</th>
        <th>操作</th>
    </tr>
    </thead>

    <%--用foreach遍历list--%>
    <tbody>
    <c:forEach var="teacher" items="${pageInfo.list}">
        <tr>
            <td>${teacher.teacherNo}</td>
            <td>${teacher.teacherName}</td>
            <td>${teacher.teacherSex}</td>
            <td>${teacher.teacherBirth}</td>
            <td>${teacher.teacherDepartment}</td>
            <td>${teacher.teacherTell}</td>
            <td>${teacher.teacherAddress}</td>
            <td>${teacher.teacherEmail}</td>
            <td>

                <c:choose>
                    <c:when test="${teacher.teacherStatus == 'T'}"><!-- 如果 -->
                        已激活
                    </c:when>

                    <c:otherwise> <!-- 否则 -->
                        待激活
                    </c:otherwise>
                </c:choose>

            </td>
            <td>${teacher.teacherAddTime}</td>
            <td>${teacher.taecherActivation}</td>
            <td>${teacher.adminName}</td>
            <td>
                <a href="${pageContext.request.contextPath}/admin/toTeaActivity?teacherNo=${teacher.teacherNo}">发布过的活动</a>&nbsp;|&nbsp;

                <c:if test="${Identity == 'admin'}">
                    <a href="${pageContext.request.contextPath}/admin/toRemoveSelfTea?teacherNo=${teacher.teacherNo}">注销此教师</a> |
                </c:if>


                <a href="${pageContext.request.contextPath}?">待定</a>
            </td>
        </tr>
    </c:forEach>
    </tbody>
</table>
<br>
<a href="${pageContext.request.contextPath}/admin/toManageTeacher01?page=${pageInfo.pageNum+1}">下一页</a>
<a href="${pageContext.request.contextPath}/admin/toManageTeacher01?page=${pageInfo.pageNum-1}">上一页</a>
当前是第${pageInfo.pageNum}页，共${pageInfo.pages}页,每页${pageInfo.pageSize}记录，共${pageInfo.total}记录
</body>
</html>

